
export const findTodosinSpecifiedFile = function( file, sings, linkList, scanRegex ) {
    var fileInUri = file.uri.toString();
    //去掉file://
    var pathWithoutFile = fileInUri.substring(7, fileInUri.length);
    
    var regex = new RegExp(scanRegex, "i");
    
    for (var line = 0; line < file.lineCount; line++) {
        var lineText = file.lineAt(line).text;
        var match = lineText.match(regex);
        if (match !== null) {
            if (!todos.hasOwnProperty(pathWithoutFile)) {
                todos[pathWithoutFile] = [];
            }
            var todoMessage = getTodoMessage(lineText, match);
            var todoLocation = getTodoLocation(pathWithoutFile, todoMessage, line, match);
            var todo = new Todo(todoLocation, pathWithoutFile, line, todoMessage, 10);
            todosList.push(todo);
            todos[pathWithoutFile].push(todo);
        }
    }
};